package com.ecreditpal.audio.platform.tengxunAI;

import cn.xsshome.taip.speech.TAipSpeech;
import lombok.extern.slf4j.Slf4j;

/**
 * Created by lishunyi on 2018/6/19
 *
 * 腾讯AI语音转写接口
 */
@Slf4j
public class TengxunAIDemo {
    private static final String APP_ID = "1106902183";
    private static final String APP_KEY = "xA1wzcIHWzBbrWR2";

    private String audioPath = "/Users/lishunyi/Desktop/audio/pp1.wav";
    public static void main(String[] args) throws Exception {
        TengxunAIDemo demo = new TengxunAIDemo();
        TAipSpeech speech = new TAipSpeech(APP_ID, APP_KEY);
        String content = speech.asrEcho(demo.audioPath, 2, 16000);
        //流式接口
//        String content = speech.asrLab(demo.audioPath, 2, 16000, 0, 15000, 1, "test1");
        log.info("[Message]Result : {}", content);
    }
}
